package com.brainhealth.customer.service;

import java.util.Date;
import java.util.List;

import com.brainhealth.common.enums.CustomerExerciseStatus;
import com.brainhealth.customer.domain.Customer;
import com.brainhealth.customer.domain.CustomerExercise;
import com.brainhealth.customer.domain.ExerciseOrder;
import com.brainhealth.customer.domain.vo.ExerciseOrderPayVO;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 会员训练订单Service接口
 * 
 * @author wolong
 * @date 2023-05-09
 */
public interface IExerciseOrderService
{
    /**
     * 查询会员训练订单
     *
     * @param exerciseOrderId 会员训练订单主键
     * @return 会员训练订单
     */
    public ExerciseOrder selectExerciseOrderByExerciseOrderId(Long exerciseOrderId);

    /**
     * 用会员训练订单ID获取订单信息
     * @param orderId
     * @return
     */
    ExerciseOrder selectExerciseOrderByOrderId(String orderId);

    /**
     * 会员token获取会员订单列表
     * @param request
     * @return
     */
    List<ExerciseOrder> getCustomerOrderList(HttpServletRequest request);

    /**
     * 查询会员训练订单列表
     *
     * @param exerciseOrder 会员训练订单
     * @return 会员训练订单集合
     */
    public List<ExerciseOrder> selectExerciseOrderList(ExerciseOrder exerciseOrder);

    /**
     * 查询训练订单
     * @param customer
     * @param exerciseOrder
     * @return
     */
    ExerciseOrder getCustomerExerciseOrder(Customer customer,ExerciseOrder exerciseOrder);

    /**
     * 获取订单
     * @param customer
     * @return
     */
    ExerciseOrder getExerciseOrder(Customer customer);

    /**
     * 查询用户当前订单号
     * @param customer
     * @return
     */
    String getOrderNo(Customer customer);

    /**
     * 会员训练订单支付
     *
     * @return
     */
    public ExerciseOrder customerExerciseOrderPay(HttpServletRequest request, ExerciseOrderPayVO exerciseOrderPayVO);

    /**
     * 会员训练订单创建
     *
     * @return
     */
    public ExerciseOrder createExerciseOrder(HttpServletRequest request, ExerciseOrderPayVO exerciseOrderPayVO);

    /**
     * 训练订单剩余支付时间
     * @return
     */
    public Date exerciseOrderRemainTime(HttpServletRequest request);

    /**
     * 会员训练订单支付成功处理训练记录
     * @param orderId
     * @return
     */
    public boolean customerExerciseOrderSuccess(String orderId, String adapayId);

    /**
     * 会员训练订单回调并处理支付订单内容
     * @param
     * @return
     */
    public void customerExerciseOrderCallback(HttpServletRequest request, HttpServletResponse response);

    /**
     * 新增会员训练订单
     *
     * @param exerciseOrder 会员训练订单
     * @return 结果
     */
    public int insertExerciseOrder(ExerciseOrder exerciseOrder);

    /**
     * 修改会员训练订单
     *
     * @param exerciseOrder 会员训练订单
     * @return 结果
     */
    public int updateExerciseOrder(ExerciseOrder exerciseOrder);

    /**
     * 批量删除会员训练订单
     *
     * @param exerciseOrderIds 需要删除的会员训练订单主键集合
     * @return 结果
     */
    public int deleteExerciseOrderByExerciseOrderIds(Long[] exerciseOrderIds);

    /**
     * 删除会员训练订单信息
     *
     * @param exerciseOrderId 会员训练订单主键
     * @return 结果
     */
    public int deleteExerciseOrderByExerciseOrderId(Long exerciseOrderId);
}
